<!DOCTYPE HTML>
<html lang="en">
<head>
  <meta name="copyright" content=
  "Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
  <meta charset="utf-8">
  <link rel="STYLESHEET" href="../book.css" type="text/css">
  <title>Adding New Ant Tasks and Types</title>
  <meta name="keyword" content="ant">
  <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"></script>
</head>
<body>
  <h1>Adding New Ant Tasks and Types</h1>
  <p>Add new Ant tasks and types through the Ant preferences page. These tasks and types will be available for
  buildfiles running in the Workbench without, having to use taskdef or typedef in the script declaration (For more on
  taskdef or typedef see the Ant documentation in <a href="http://ant.apache.org/index.html" target=
  "_blank">http://ant.apache.org</a>).</p>
  <p>To add a new task or type:</p>
  <ol>
    <li>Open the <a class="command-link" href=
    'javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ant.ui.AntRuntimePreferencePage)")'>
    <img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"> <b>Ant &gt; Runtime</b></a>
    preference page.</li>
    <li>Click the <b>Tasks</b> tab or the <b>Types</b> tab.</li>
    <li>Click <b>Add Task</b> or <b>Add Type</b>.</li>
    <li>Provide a name and class for the task or type.</li>
    <li>Select the library where the task or type is declared. If the library is not present on the list, you must add
    it to the Ant classpath (see the Related task link below).</li>
  </ol>
  <h3 class="related">Related Concepts</h3><a href="../concepts/concepts-antsupport.htm">Ant Support</a><br>
  <a href="../concepts/concepts-22.htm">Builds</a><br>
  <a href="../concepts/concepts-exttools.htm">External tools</a>
  <h3 class="related">Related Tasks</h3><a href="../tasks/tasks-exttools-running.htm">Running external tools</a><br>
  <a href="../tasks/tasks-ant-classpath.htm">Modifying the Ant classpath</a><br>
  <a href="../tasks/tasks-ant-version.htm">Using a different version of Ant</a>
</body>
</html>
